#ifndef DEFINE_H
#define DEFINE_H

#include <QByteArray>
#include <QHostAddress>
#include <QStringList>

enum Notice
{
	NoticeConnect,	// CONNECT
	NoticeDisconnect, // DISCONNECT
	NoticeResponse	// RESPONSE
};

enum Mode
{
	Tx,
	Rx
};

enum UDPGroup
{
	GroupA = 6711,
	GroupB,
	GroupC,
	GroupD,
	GroupE,
	GroupF
};

struct UDPPacket
{
	QHostAddress addr;
	QByteArray dgram;
	int port;
};

struct Client
{
	QString group;
	QString name;
	QString groupName;
	QHostAddress addr;
};

struct IPInfo
{
	bool isSet;
	QHostAddress addr;
	QString addrs[3];
};

#define MSG_PORT 6713
#define FILE_PORT 6715

#define RESPONSE(__g, __n) (__g + ':' + __n)

#endif // DEFINE_H
